package org.learn.test;
import com.sun.xml.internal.ws.api.pipe.NextAction;

import java.util.Scanner;
public class DoWhileExercise02 {
    public static void main(String[] args) {
        //统计1-200之间能被5整除但不能被3整除的数
         int i = 1;
         int count = 0;
         do{
             if(i % 5 == 0 && i % 3 != 0) {
                 System.out.println("i=" + i);
                 count += 1;
             }
             i++;
         }while(i <= 200);
        System.out.println("count=" + count);
         //要账
         Scanner myScanner = new Scanner(System.in);
         char answer = ' ' ;
         do{
             System.out.println("老韩使出五连鞭抽打");
             System.out.println("老韩问：还钱吗？y or n");
             answer = myScanner.next().charAt(0);
         }while(answer != 'y');
         System.out.println("李三还钱了");
    }       

}
